<?php //setcookie ("TestCookie", "test"); ?>
<?php echo $this->doctype(); ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">
<head>
<?php
    $this->headScript()->prependFile('/scripts/jquery-1.7.min.js',
                                    'text/javascript', array());    
    if ($this->syntaxHighlight) {
        $this->headScript()->appendFile('/scripts/syntaxhighlighter/shCore.js',
                                        'text/javascript', array())
                           ->appendFile('/scripts/syntaxhighlighter/shBrushPhp.js',
                                        'text/javascript', array())
                           ->appendFile('/scripts/syntaxhighlighter/shBrushXml.js',
                                        'text/javascript', array())
                           ->appendFile('/scripts/syntaxhighlighter/shBrushJScript.js',
                                        'text/javascript', array())
                           ->appendFile('/scripts/syntaxhighlighter/shBrushSql.js',
                                        'text/javascript', array());
        $this->headLink()->appendStylesheet('/scripts/syntaxhighlighter/style/shCoreRDark.css')
                         ->appendStylesheet('/scripts/syntaxhighlighter/style/shThemeRDark.css');
    }
?>
<?php
    $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')
                     ->appendHttpEquiv('Content-Language', 'RU')
                     ->appendName('author', 'morontt');
    echo $this->headMeta() . PHP_EOL;
    echo $this->headTitle() . PHP_EOL;
    $this->headLink()->prependStylesheet('/css/main_s.css');
    $this->headLink()->prependStylesheet('http://fonts.googleapis.com/css?family=Ubuntu+Mono:400,400italic,700,700italic&subset=latin,cyrillic,cyrillic-ext,latin-ext');
    $this->headLink(array('rel'  => 'shortcut icon',
                          'href' => '/favicon.ico',
                          'type' => 'image/x-icon'));
    $this->headLink(array('rel'   => 'alternate',
                          'title' => 'RSS',
                          'href'  => 'http://' . $_SERVER['HTTP_HOST'] . '/feed/rss',
                          'type'  => 'application/rss+xml'));
    $this->headLink(array('rel'   => 'alternate',
                          'title' => 'Atom',
                          'href'  => 'http://' . $_SERVER['HTTP_HOST'] . '/feed/atom',
                          'type'  => 'application/atom+xml'));
    echo $this->headLink() . PHP_EOL;
    echo $this->headScript() . PHP_EOL; ?>
<?php if ((getenv('APPLICATION_ENV') != 'development') && $this->showGoogleAnalytic) { ?>
<script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-21476757-2']);
    _gaq.push(['_trackPageview']);
    (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
</script>
<?php } ?>
</head>
<body>
    <div id="container">
        <div id="no-JavaScript">
            Для корректной работы этой страницы требуется поддержка JavaScript в браузере.
        </div>
        <script type="text/javascript">
            jQuery('#no-JavaScript').remove();
        </script>
        <div id="header">
            <div id="sitename">
                <a href="<?php
                            echo $this->url(array('page' => 1), 'home');
                         ?>"><?php echo $this->layout()->title; ?></a>
            </div>
        </div>
        <?php
            echo $this->siteMenu();
            echo $this->layout()->content;
		?>
        <div style="clear: both" />
        <div id="footer">
            &#169; 2011 <a href="<?php echo $this->url(array('page' => 1), 'home'); ?>"><?php echo $this->layout()->title; ?></a>: Mem <?php echo memory_get_peak_usage(); ?>
        </div>
    </div>
<?php if ($this->syntaxHighlight) { ?>
<script type="text/javascript">
    SyntaxHighlighter.all()
</script>
<?php } ?>
</body>
</html>
